package com.hengxinguotong.hxgtwygsp.ui.revenue.allocate;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hengxinguotong.hxgtwygsp.R;
import com.hengxinguotong.hxgtwygsp.model.Allocate;

import java.util.List;

/**
 * Created by CS-Yong
 * 2019/8/9  10:38
 */
public class AllocateAdapter extends BaseQuickAdapter<Allocate , BaseViewHolder> {
    public AllocateAdapter(int layoutResId, @Nullable List<Allocate> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Allocate item) {
        ImageView icon = helper.getView(R.id.allocate_icon);
        icon.setImageLevel(item.getLevel());
        helper.setText(R.id.allocate_name,item.getName());
        helper.setText(R.id.allocate_money,String.format(mContext.getString(R.string.allocate_money),item.getMoney()));
        helper.setText(R.id.allocate_yuan,R.string.budget_yuan);

    }
}
